3.8.98 \(\int \frac {\cos ^2(c+d x) (B \sec (c+d x)+C \sec ^2(c+d x))}{a+b \sec (c+d x)} \, dx\) [798]

Optimal. Leaf size=90 \[ -\frac {(b B-a C) x}{a^2}+\frac {2 b (b B-a C) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 \sqrt {a-b} \sqrt {a+b} d}+\frac {B \sin (c+d x)}{a d} \]

[Out]

-(B*b-C*a)*x/a^2+B*sin(d*x+c)/a/d+2*b*(B*b-C*a)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/a^2/d/(a-b
)^(1/2)/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {4157, 4119, 12, 3868, 2738, 214} \begin {gather*} \frac {2 b (b B-a C) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 d \sqrt {a-b} \sqrt {a+b}}-\frac {x (b B-a C)}{a^2}+\frac {B \sin (c+d x)}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]),x]

[Out]

-(((b*B - a*C)*x)/a^2) + (2*b*(b*B - a*C)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^2*Sqrt[a - b
]*Sqrt[a + b]*d) + (B*Sin[c + d*x])/(a*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 2738

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 3868

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(-1), x_Symbol] :> Simp[x/a, x] - Dist[1/a, Int[1/(1 + (a/b)*Sin[c
+ d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]

Rule 4119

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d*Csc[e + f*x])^n/(a*f*n)), x]
+ Dist[1/(a*d*n), Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1)*Simp[a*B*n - A*b*(m + n + 1) + A*a*(n +
1)*Csc[e + f*x] + A*b*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, m}, x] && NeQ[A*b
- a*B, 0] && NeQ[a^2 - b^2, 0] && LeQ[n, -1]

Rule 4157

Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(
x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.), x_Symbol] :> Dist[1/b^2, Int[(a + b*Csc[e + f*x])
^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m,
 n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]

Rubi steps

\begin {align*} \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx &=\int \frac {\cos (c+d x) (B+C \sec (c+d x))}{a+b \sec (c+d x)} \, dx\\ &=\frac {B \sin (c+d x)}{a d}-\frac {\int \frac {b B-a C}{a+b \sec (c+d x)} \, dx}{a}\\ &=\frac {B \sin (c+d x)}{a d}-\frac {(b B-a C) \int \frac {1}{a+b \sec (c+d x)} \, dx}{a}\\ &=-\frac {(b B-a C) x}{a^2}+\frac {B \sin (c+d x)}{a d}+\frac {(b B-a C) \int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx}{a^2}\\ &=-\frac {(b B-a C) x}{a^2}+\frac {B \sin (c+d x)}{a d}+\frac {(2 (b B-a C)) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^2 d}\\ &=-\frac {(b B-a C) x}{a^2}+\frac {2 b (b B-a C) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 \sqrt {a-b} \sqrt {a+b} d}+\frac {B \sin (c+d x)}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.23, size = 85, normalized size = 0.94 \begin {gather*} \frac {(-b B+a C) (c+d x)-\frac {2 b (b B-a C) \tanh ^{-1}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+a B \sin (c+d x)}{a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]),x]

[Out]

((-(b*B) + a*C)*(c + d*x) - (2*b*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 -
b^2] + a*B*Sin[c + d*x])/(a^2*d)

________________________________________________________________________________________

Maple [A]
time = 0.18, size = 111, normalized size = 1.23

method result size
derivativedivides \(\frac {-\frac {2 \left (-\frac {B a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+\left (b B -a C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{2}}+\frac {2 b \left (b B -a C \right ) \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) \(111\)
default \(\frac {-\frac {2 \left (-\frac {B a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+\left (b B -a C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{2}}+\frac {2 b \left (b B -a C \right ) \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) \(111\)
risch \(-\frac {x b B}{a^{2}}+\frac {x C}{a}-\frac {i B \,{\mathrm e}^{i \left (d x +c \right )}}{2 a d}+\frac {i B \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a d}+\frac {b^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) B}{\sqrt {a^{2}-b^{2}}\, d \,a^{2}}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) C}{\sqrt {a^{2}-b^{2}}\, d a}-\frac {b^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) B}{\sqrt {a^{2}-b^{2}}\, d \,a^{2}}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) C}{\sqrt {a^{2}-b^{2}}\, d a}\) \(348\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(-2/a^2*(-B*a*tan(1/2*d*x+1/2*c)/(1+tan(1/2*d*x+1/2*c)^2)+(B*b-C*a)*arctan(tan(1/2*d*x+1/2*c)))+2*b*(B*b-C
*a)/a^2/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
 for more de

________________________________________________________________________________________

Fricas [A]
time = 2.04, size = 328, normalized size = 3.64 \begin {gather*} \left [\frac {2 \, {\left (C a^{3} - B a^{2} b - C a b^{2} + B b^{3}\right )} d x - {\left (C a b - B b^{2}\right )} \sqrt {a^{2} - b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) + 2 \, {\left (B a^{3} - B a b^{2}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{4} - a^{2} b^{2}\right )} d}, \frac {{\left (C a^{3} - B a^{2} b - C a b^{2} + B b^{3}\right )} d x - {\left (C a b - B b^{2}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) + {\left (B a^{3} - B a b^{2}\right )} \sin \left (d x + c\right )}{{\left (a^{4} - a^{2} b^{2}\right )} d}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

[1/2*(2*(C*a^3 - B*a^2*b - C*a*b^2 + B*b^3)*d*x - (C*a*b - B*b^2)*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a
^2 - 2*b^2)*cos(d*x + c)^2 + 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x +
 c)^2 + 2*a*b*cos(d*x + c) + b^2)) + 2*(B*a^3 - B*a*b^2)*sin(d*x + c))/((a^4 - a^2*b^2)*d), ((C*a^3 - B*a^2*b
- C*a*b^2 + B*b^3)*d*x - (C*a*b - B*b^2)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2
- b^2)*sin(d*x + c))) + (B*a^3 - B*a*b^2)*sin(d*x + c))/((a^4 - a^2*b^2)*d)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2*(B*sec(d*x+c)+C*sec(d*x+c)**2)/(a+b*sec(d*x+c)),x)

[Out]

Integral((B + C*sec(c + d*x))*cos(c + d*x)**2*sec(c + d*x)/(a + b*sec(c + d*x)), x)

________________________________________________________________________________________

Giac [A]
time = 0.51, size = 141, normalized size = 1.57 \begin {gather*} \frac {\frac {{\left (C a - B b\right )} {\left (d x + c\right )}}{a^{2}} + \frac {2 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a} - \frac {2 \, {\left (C a b - B b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} a^{2}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

((C*a - B*b)*(d*x + c)/a^2 + 2*B*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 + 1)*a) - 2*(C*a*b - B*b^2)*(pi
*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqr
t(-a^2 + b^2)))/(sqrt(-a^2 + b^2)*a^2))/d

________________________________________________________________________________________

Mupad [B]
time = 4.98, size = 740, normalized size = 8.22 \begin {gather*} \frac {2\,B\,b^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d\,\left (a^4-a^2\,b^2\right )}+\frac {2\,C\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d\,\left (a^4-a^2\,b^2\right )}+\frac {B\,a^3\,\sin \left (c+d\,x\right )}{d\,\left (a^4-a^2\,b^2\right )}-\frac {B\,a\,b^2\,\sin \left (c+d\,x\right )}{d\,\left (a^4-a^2\,b^2\right )}+\frac {B\,b^2\,\mathrm {atan}\left (\frac {-a^5\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,1{}\mathrm {i}+b^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\left (a^2-b^2\right )}^{3/2}\,2{}\mathrm {i}+b^5\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,2{}\mathrm {i}-a^2\,b^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,3{}\mathrm {i}+a^3\,b^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,1{}\mathrm {i}+a^4\,b\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^6-2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^4\,b^2+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b^4}\right )\,\sqrt {a^2-b^2}\,2{}\mathrm {i}}{d\,\left (a^4-a^2\,b^2\right )}-\frac {2\,B\,a^2\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d\,\left (a^4-a^2\,b^2\right )}-\frac {2\,C\,a\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d\,\left (a^4-a^2\,b^2\right )}-\frac {C\,a\,b\,\mathrm {atan}\left (\frac {-a^5\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,1{}\mathrm {i}+b^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\left (a^2-b^2\right )}^{3/2}\,2{}\mathrm {i}+b^5\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,2{}\mathrm {i}-a^2\,b^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,3{}\mathrm {i}+a^3\,b^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,1{}\mathrm {i}+a^4\,b\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2-b^2}\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^6-2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^4\,b^2+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b^4}\right )\,\sqrt {a^2-b^2}\,2{}\mathrm {i}}{d\,\left (a^4-a^2\,b^2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)^2*(B/cos(c + d*x) + C/cos(c + d*x)^2))/(a + b/cos(c + d*x)),x)

[Out]

(2*B*b^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(d*(a^4 - a^2*b^2)) + (2*C*a^3*atan(sin(c/2 + (d*x)/2)/c
os(c/2 + (d*x)/2)))/(d*(a^4 - a^2*b^2)) + (B*a^3*sin(c + d*x))/(d*(a^4 - a^2*b^2)) - (B*a*b^2*sin(c + d*x))/(d
*(a^4 - a^2*b^2)) + (B*b^2*atan((b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(3/2)*2i - a^5*sin(c/2 + (d*x)/2)*(a^2 - b
^2)^(1/2)*1i + b^5*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*2i - a^2*b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*3i +
 a^3*b^2*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*1i + a^4*b*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*1i)/(a^6*cos(c/2
 + (d*x)/2) + a^2*b^4*cos(c/2 + (d*x)/2) - 2*a^4*b^2*cos(c/2 + (d*x)/2)))*(a^2 - b^2)^(1/2)*2i)/(d*(a^4 - a^2*
b^2)) - (2*B*a^2*b*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(d*(a^4 - a^2*b^2)) - (2*C*a*b^2*atan(sin(c/2
+ (d*x)/2)/cos(c/2 + (d*x)/2)))/(d*(a^4 - a^2*b^2)) - (C*a*b*atan((b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(3/2)*2i
 - a^5*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*1i + b^5*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*2i - a^2*b^3*sin(c/2
 + (d*x)/2)*(a^2 - b^2)^(1/2)*3i + a^3*b^2*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*1i + a^4*b*sin(c/2 + (d*x)/2)*
(a^2 - b^2)^(1/2)*1i)/(a^6*cos(c/2 + (d*x)/2) + a^2*b^4*cos(c/2 + (d*x)/2) - 2*a^4*b^2*cos(c/2 + (d*x)/2)))*(a
^2 - b^2)^(1/2)*2i)/(d*(a^4 - a^2*b^2))

________________________________________________________________________________________